<?php
if (session_id() == "") session_start();

$_SESSION['id'] = session_id();
$u = $_POST['username']; //username from form 
$p = $_POST['password']; // password from form. 

	if($u == "sofa" && $p == "wysiwyg4.01"){ 
		$_SESSION['time'] = time();
		$_SESSION['user'] = $u; 
		$_SESSION['loggedin'] = "yes";
		header('Location:' . 'edit.php');
	}else{ 
		header('Location:' . 'edit.php');
		$_SESSION['error'] = '<h1>Username or pass was incorrect</h1>';
	} 
 
?>